﻿using System;

namespace Tequila.Phone.Infrastructure.Logging
{
    /// <summary>
    /// Logger
    /// </summary>
    public interface ILogger
    {
        /// <summary>
        /// Determines whether provided <see cref="Level"/> is enabled.
        /// </summary>
        /// <param name="level"><see cref="Level"/></param>
        /// <returns></returns>
        bool IsEnabled(Level level);

        /// <summary>
        /// Writes logger entry.
        /// </summary>
        /// <param name="level"><see cref="Level"/></param>
        /// <param name="message">Message to be written.</param>
        void Write(Level level, string message);
        
        /// <summary>
        /// Writes logger entry.
        /// </summary>
        /// <param name="level"><see cref="Level"/></param>
        /// <param name="format">Message format to be used</param>
        /// <param name="args">Parameters</param>
        void Write(Level level, string format, params object[] args);

        /// <summary>
        /// Writes logger entry.
        /// </summary>
        /// <param name="level"><see cref="Level"/></param>
        /// <param name="exception">Exception to be logged.</param>
        void Write(Level level, Exception exception);

        /// <summary>
        /// Writes logger entry.
        /// </summary>
        /// <param name="level"><see cref="Level"/></param>
        /// <param name="message">Message to be written.</param>
        /// <param name="exception">Exception to be logged.</param>
        void Write(Level level, string message, Exception exception);
    }
}
